package cn.itsource.user.controller;

import cn.itsource.basic.util.AjaxResult;
import cn.itsource.user.service.IWxUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wechat")
public class WxController {

    @Autowired
    private IWxUserService wxUserService;

    //微信登录
    @PostMapping
    public AjaxResult wxLogin(@RequestBody Map<String,String> map){
        return wxUserService.wxLogin(map);

    }
    //绑定用户
    @PostMapping("/binder")
    public AjaxResult binder(@RequestBody Map<String,String> map){
        return wxUserService.binder(map);

    }
}
